Check if present and get a link module's name

Hello all,

In dxl, how do I check if a formal module has a link module? And if present, how do I get it's name?

 

Any help will be much appreciated. Thanks in advance.


cron7 - Tue Feb 13 01:17:46 EST 2018

Re: Check if present and get a link module's name
Mike.Scharnow - Tue Feb 13 05:19:48 EST 2018

hm, there is no such thing as one link module for a formal module. Formal modules and link modules coexist, they have an m:n relationship. Connections between link modules and formal modules exist via link sets and link restrictions. The answer depends ony our data model.

what is the situation that you want to check using DXL? 

Re: Check if present and get a link module's name
cron7 - Tue Feb 13 05:28:25 EST 2018

Mike.Scharnow - Tue Feb 13 05:19:48 EST 2018

hm, there is no such thing as one link module for a formal module. Formal modules and link modules coexist, they have an m:n relationship. Connections between link modules and formal modules exist via link sets and link restrictions. The answer depends ony our data model.

what is the situation that you want to check using DXL? 

Hi Mike, thanks for your input. My situation is :

I have to check if at least one baseline exists for a formal module. If so, I should remove the "delete" right for all the user groups except the admin group for that module and the corresponding link modules.

 

Thanks in advance. :)

Re: Check if present and get a link module's name
Mike.Scharnow - Wed Feb 14 00:41:04 EST 2018

cron7 - Tue Feb 13 05:28:25 EST 2018

Hi Mike, thanks for your input. My situation is :

I have to check if at least one baseline exists for a formal module. If so, I should remove the "delete" right for all the user groups except the admin group for that module and the corresponding link modules.

 

Thanks in advance. :)

I understand. Well, first, I suggest, you give these users RMC propagate MD access rights, to the formal (!) module, not only remove D, otherwise it will probably happen that users will not be able to delete objects, once a baseline has been created, and you will get complaints sooner or later :)

 

With this use case, you are only looking in the past, not the possible future. That means, it is only important for you to detect which link modules are currently being used by links.

I would suggest to:

- open the module

- iterate over each existing object

- for these, iterate over all existing out links (and in links, depending on what is needed)

- for each link, get its link module, using the perm "Module module(Link l)" and put it in a skip list

- Note that it might be necessary to repeat this process for each baseline of the module under inspection.

- afterwards, iterate over all link modules in your skip list and set the access rights accordingly.

 

 

In theory it could happen that the users have access rights RMC propagate MD on the link module. This would not be so great, as the users would still be able to delete the link set of the link module and thus still be able to delete data. You might want to check this situation.

 

By the way, I noticed some time ago (did not have time to confirm this today) that links which reside in a baseline set, going from baseline to baseline, do not need a link set any more, so, it might not be too dangerous if you allow users to delete these link modules / link sets.

 

Hope this helps